const articleRouter = require('@/routes/article.route')
const circleRouter = require('@/routes/circle.route')
const feedbackRouter = require('@/routes/feedback.route')
const userRouter = require('@/routes/user.route')
const dynamicRouter = require('@/routes/dynamic.route')
const commentRouter = require('@/routes/comment.route')
const loginLogRouter = require('@/routes/login_log.route')
const staffRouter = require('@/routes/staff.route')
const resourceRouter = require('@/routes/resource.route')
const permissionRouter = require('@/routes/permission.route')
const toolRouter = require('@/routes/tool.route')
const utilsRouter = require('@/routes/utils.route')
const statisticRouter = require('@/routes/statistic.route')
const visitRouter = require('@/routes/visit.route')
const friendLinkRouter = require('@/routes/friend_link.route')
const xmindRouter = require('@/routes/xmind.route')

function routerInstall (app) {
  app.use('/api/v1/article', articleRouter)
  app.use('/api/v1/circle', circleRouter)
  app.use('/api/v1/feedback', feedbackRouter)
  app.use('/api/v1/user', userRouter)
  app.use('/api/v1/dynamic', dynamicRouter)
  app.use('/api/v1/comment', commentRouter)
  app.use('/api/v1/loginlog', loginLogRouter)
  app.use('/api/v1/staff', staffRouter)
  app.use('/api/v1/resource', resourceRouter)
  app.use('/api/v1', permissionRouter)
  app.use('/api/v1/tool', toolRouter)
  app.use('/api/v1', utilsRouter)
  app.use('/api/v1/statistic', statisticRouter)
  app.use('/api/v1/visit', visitRouter)
  app.use('/api/v1/friend-link', friendLinkRouter)
  app.use('/api/v1/xmind', xmindRouter)
}

module.exports = routerInstall
